let rec size l = match l with
| [] -> 0
| hd::tl -> 1 + size tl;;

let rec sum l = match l with
| [] -> 0
| hd::tl -> hd + sum tl;;

let x = [1;2;3;4];;
print_endline(string_of_int(size(x)));;
print_endline(string_of_int(sum(x)));;
